<?php
namespace app\run\controller;
use think\Db;
use app\common\model\User as userModel;
class User extends Run{
	public function _initialize(){
		
		call_user_func(array('parent',__FUNCTION__));
	}


	public function  adminUser(){
		$res = userModel::adminSelect();
		// dump($res);die;
		if(!$res) return $this->error('没有管理员','Index/index');
		
			$this->assign('res',$res);
			// return $this->fetch();
	
		
	} 
	// //用户列表
	public function index(){
		$res = userModel::select();
		// $ip = $_SERVER["REMOTE_ADDR"];
	 //    echo $ip;
  
		if(!$res) return $this->error('没有用户','Index/index');
		$this->assign('res',$res);
		return $this->fetch();
	}

	public function user_info(){

		if(request()->isGet()){

			$id = input('id');
			// pr($id);die;
			
		}
		return $this->fetch();
	}

}